package com.szp.lagou.neo4j.neo4jdemo.repository;

import java.util.Collection;

import com.szp.lagou.neo4j.neo4jdemo.entity.Person;

import org.springframework.data.neo4j.annotation.Query;
import org.springframework.data.neo4j.repository.Neo4jRepository;

public interface PersonRepository extends Neo4jRepository<Person,Long>{
    // @Query("MATCH (m:Movie)<-[r:ACTED_IN]-(a:Person) RETURN m,r,a LIMIT {limit}")
    // Collection<Movie> graph(@Param("limit") int limit);
    @Query("MATCH (m:Person)<-[r]-(a:Person) RETURN m,r,a")
	Collection<Person> graph();
}